<template>
  <div>
    <h3>自定义事件传参（子组件向父组件传递参数）</h3>
    当前我的车是:{{ car }}
    <Child :car="car" @changeCar="handleCarChange"></Child>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import Child from './Child.vue'

const car = ref('宝骏')

const handleCarChange = (newCar: string) => {
  car.value = newCar
}
</script>

<style scoped></style>
